package com.spc.car.data;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * 应用启动入口
 */
@EnableAsync
@SpringBootApplication
@ComponentScan("com.spc.car.data")
public class SpringbootTestApplication {
    /**
     * @param args
     */
    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(SpringbootTestApplication.class);
        application.run(args);
    }

    @Bean
    public MapperScannerConfigurer mapperScannerConfigurer() {
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
        mapperScannerConfigurer.setSqlSessionFactoryBeanName("oaSqlSessionFactory");
        mapperScannerConfigurer.setBasePackage("com.spc.oa.data.mapper");
        return mapperScannerConfigurer;
    }
}
